package com.sy.wz.client.ucenter.User;

import com.sy.wz.client.config.FeignConfiguration;
import com.sy.wz.common.CommonConstants;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * Create by wongloong on 17-8-17
 */
@FeignClient(value= CommonConstants.SERVICE_UCENTER, configuration = {FeignConfiguration.class},fallback = UserFallBackClient.class)
public interface UserClient {
    @RequestMapping(value = "/user/add", method = RequestMethod.POST)
    boolean saveOrUpdate(@RequestBody UserDto userDto);

    @RequestMapping(value = "/user/list", method = RequestMethod.GET)
    List<UserDto> list();
}
